<!DOCTYPE HTML>
<html>
<!-- var arr = ['*','##',"***","&&","****","##*"];
arr[7] = "**";
在页面显示如下图所示的图案：
*
**
***
**** -->

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>数组</title>
  <script type="text/javascript">
    //创建数组
    var arr = ['*', '##', "***", "&&", "****", "##*"];
    arr[7] = "**";
    let myarr = new Array(4);
    myarr[0] = arr[0];
    myarr[3] = arr[4];
    myarr[1] = arr[7];
    myarr[2] = arr[2]
    //显示数组长度
    //将数组内容输出，完成达到的效果。
    for (let i = 0; i < myarr.length; i++) {
      document.write(myarr[i] + "<br>");
    }
  </script>
</head>

<body>
</body>

</html>